#include "VulkanPendingState.h"

#include "VulkanPipeline.h"

namespace Alice
{
    VulkanPendingGraphicsState::VulkanPendingGraphicsState(VulkanDevice* inDevice,VulkanCommandListContext*inVulkanCommandListContext)
        :mDevice(inDevice),mVulkanCommandListContext(inVulkanCommandListContext)
    {
        mVulkanCGIGraphicPipelineState=nullptr;
    }
    bool VulkanPendingGraphicsState::SetGraphicsPipeline(FVulkanCGIGraphicPipelineState* inVulkanCGIGraphicPipelineState, bool bForceReset)
    {
        if(inVulkanCGIGraphicPipelineState!=mVulkanCGIGraphicPipelineState)
        {
            mVulkanCGIGraphicPipelineState=inVulkanCGIGraphicPipelineState;
            return true;
        }
        return false;
    }
    void VulkanPendingGraphicsState::Bind(VkCommandBuffer inCommandBuffer)const
    {
        mVulkanCGIGraphicPipelineState->Bind(inCommandBuffer);
    }
}
